package factory;

public class CarFactory {
    private static final String BME = "BMW";
    private static final String BENZ = "BENZ";

    public Car getCar(String carBrand) {
        if (BME.equals(carBrand)) {
            return new Bmw();
        }
        if (BENZ.equals(carBrand)) {
            return new Benz();
        }
        return null;
    }
}
